<template>
  <div class="container">
    <!-- 机构概述 今日数据-->
    <el-row class="row1" type="flex" justify="space-between">
      <el-col class="col1">
        <el-card>
          <p class="t1">机构概述</p>
          <div class="content">
            <div class="left-content">
              <div class="name"></div>
              <div class="address">地址：</div>
              <div class="manager">负责人：</div>
              <el-button type="warning" plain class="search"
                >查看营业部负责人</el-button
              >
            </div>
            <div class="right-content">
              <div class="item">
                <div class="label">分拣中心(个)</div>
                <div class="num"></div>
              </div>
              <div class="item">
                <div class="label">营业部(个)</div>
                <div class="num"></div>
              </div>
              <div class="item">
                <div class="label">司机人数(个)</div>
                <div class="num"></div>
              </div>
              <div class="item">
                <div class="label">快递员人数(个)</div>
                <div class="num"></div>
              </div>
            </div>
          </div>
        </el-card>
      </el-col>
      <el-col class="col2">
        <el-card>
          <div class="header">
            <p>今日数据</p>
            <div class="time">2023-02-22 18:19</div>
          </div>
          <el-row class="order-info">
            <el-col :span="8">
              <div class="label">订单金额(元)</div>
              <div class="num"></div>
              <div class="arrow">较昨日 -</div>
            </el-col>
            <el-col :span="8">
              <div class="label">订单数量(元)</div>
              <div class="num"></div>
              <div class="arrow">较昨日 -</div>
            </el-col>
            <el-col :span="8">
              <div class="label">运输次数(次)</div>
              <div class="num"></div>
              <div class="arrow">较昨日 -</div>
            </el-col>
          </el-row>
        </el-card>
      </el-col>
    </el-row>

    <!-- 待办任务 执行中任务-->
    <el-row class="row2" type="flex" justify="space-between">
      <el-col class="col1">
        <el-card class="hots">
          <div class="header">
            <p class="tips">
              待办任务
              <el-tooltip class="tips" placement="bottom-start" effect="light">
                <div slot="content">
                  待取件率=待取件/(下单数量-取消数量)，且取件类型=上门取件<br />
                  待派送率=待派送/(待派送+派送中+已签收+拒收)<br />
                  未分配率=未分配/全部数据<br />
                  超时率=超时任务/(已完成+进行中+已取消）
                </div>
                <img
                  src=""
                  alt=""
                  class="img"
                />
              </el-tooltip>
            </p>
            <div class="time">2023-02-22 18:19</div>
          </div>
          <div class="chart-box">
            <div class="chart">
            </div>
          </div>
          <div class="bottom">
            <div class="item" id="main">
              <span>待取件</span>
              <span>0</span>
            </div>
            <div class="item">
              <span>待派件</span>
              <span>0</span>
            </div>
            <div class="item">
              <span>未分配运输</span>
              <span>0</span>
            </div>
            <div class="item">
              <span>超时运输</span>
              <span>0</span>
            </div>
          </div>
        </el-card>
      </el-col>
      <el-col class="col2">
        <el-card class="hots">
          <div class="header">
            <p class="tips">
              执行中任务
              <el-tooltip class="tips" placement="bottom-start" effect="light">
                <div slot="content">
                  运输率=运输中/(全部订单-待取件-已取件-网点入库-待装车-已取消）<br />
                  派送率=派送中/(待派送+派送中+已签收+拒收）<br />
                </div>
                <img
                  src=""
                  alt=""
                  class="img"
                />
              </el-tooltip>
            </p>
            <div class="time">2023-02-22 18:19</div>
          </div>
          <div class="chart-box">
            <div class="chart"></div>
          </div>
          <div class="bottom">
            <div class="item">
              <span>运输中</span>
              <span>0</span>
            </div>
            <div class="item">
              <span>派件中</span>
              <span>0</span>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>

    <!-- 常用功能 -->
    <el-row class="row2">
      <el-col class="col3">
        <el-card class="function">
          <p class="title">常用功能</p>
          <div class="list">
            <div class="item" @click="$router.push('/operational')">
              <img
                src=""
              />
              <p>快递作业</p>
            </div>
            <div class="item" @click="$router.push('/task')">
              <img
                src=""
              />
              <p>运输任务</p>
            </div>
            <div class="item" @click="$router.push('/lines')">
              <img
                src=""
              />
              <p>线路管理</p>
            </div>
            <div class="item" @click="$router.push('/carlist')">
              <img
                src=""
              />
              <p>车辆管理</p>
            </div>
            <div class="item" @click="$router.push('/driver')">
              <img
                src="https://slwl-admin.itheima.net/static/img/useFeature5.cc8a9bb1.png"
              />
              <p>司机管理</p>
            </div>
            <div class="item" @click="$router.push('/fee')">
              <img
                src="https://slwl-admin.itheima.net/static/img/useFeature6.67f8db98.png"
              />
              <p>运费查询</p>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>

    <!-- 线路管理 运输任务 -->
    <el-row class="row2">
      <el-col class="col4">
        <el-card class="lines">
          <p class="t1">线路管理</p>
          <div class="lineChart"></div>
        </el-card>
      </el-col>
      <el-col class="col4">
        <el-card class="task">
          <div class="header">
            <p>运输任务</p>
            <div class="more" @click="$router.push('/task')">查看更多</div>
          </div>
        </el-card>
      </el-col>
    </el-row>

    <!-- 订单总量 订单分布 -->
    <el-row class="row2">
      <el-col class="col4">
        <el-card class="orders">
          <div class="header">
            <p>订单总量</p>
            <div class="time1">2023-02-22 18:19</div>
          </div>
          <p class="total">单位：笔</p>
          <div class="totalOrder">
            <div class="item">
              <div class="num"></div>
              <div class="label">订单最高值</div>
            </div>
            <div class="item">
              <div class="num"></div>
              <div class="label">订单平均值</div>
            </div>
            <div class="item">
              <div class="num"></div>
              <div class="label">订单最新值</div>
            </div>
          </div>
        </el-card>
      </el-col>
      <el-col class="col4">
        <el-card class="orders">
          <div class="header">
            <p>订单总量</p>
            <div class="time1">2023-02-22 18:19</div>
          </div>
          <p class="total">单位：笔</p>
          <div class="totalScale"></div>
        </el-card>
      </el-col>
    </el-row>

    <el-dialog></el-dialog>
    <!-- 注脚 -->
    <span class="gzt-remark"> 注：工作台展示数据为虚拟数据 </span>
  </div>
</template>

<script>
export default {
  name: 'DashboardIndex'

}
</script>

<style lang="scss" scoped>
.container {
  padding: 10px 20px 20px;
  background-color: #f3f4f7;
  padding-top: 23px;
}
.row1 {
  margin-left: -10px;
  margin-right: -10px;
  margin-top: 15px;
  margin-bottom: 15px;
  .el-col {
    padding-left: 12px;
    padding-right: 12px;
  }
}
.row2 {
  margin-left: -10px;
  margin-right: -10px;
  margin-bottom: 15px;
  .el-col {
    padding-left: 12px;
    padding-right: 12px;
  }
}
.t1 {
  font-size: 16px;
  font-weight: 700;
  margin-top: 0;
}
.content {
  display: flex;
  position: relative;
  .left-content {
    padding-left: 10px;
    flex: 50%;
    border-right: 1px solid #ebeef5;
    .name {
      font-size: 16px;
      margin-top: 20px;
      margin-bottom: 13px;
    }
    .address {
      font-size: 14px;
      color: #818693;
      margin-bottom: 8px;
    }
    .manager {
      font-size: 14px;
      color: #818693;
      margin-bottom: 23px;
    }
    ::v-deep .search {
      color: #e15536;
      background: #ffeeeb;
      border: 1px solid #f3917c;
    }
  }
  .right-content {
    flex: 50%;
    width: 300px;
    flex-wrap: wrap;
    display: flex;
    .item {
      flex: 50%;
      display: flex;
      align-items: center;
      flex-direction: column;
      -webkit-box-align: center;
      -webkit-box-orient: vertical;
      -webkit-box-direction: normal;
    }
    .item:first-child {
      height: 85px;
    }
    .item:nth-child(2) {
      height: 85px;
    }
    .label {
      font-size: 14px;
      margin-bottom: 10px;
    }
    .num {
      font-size: 32px;
      font-weight: 700;
      color: #e15536;
      cursor: pointer;
    }
  }
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  -webkit-box-pack: justify;
  -webkit-box-align: baseline;
  p {
    margin-top: 0;
    font-size: 16px;
    color: #20232a;
    font-weight: 700;
  }
  .time {
    font-size: 14px;
    display: flex;
    -webkit-box-align: center;
    cursor: pointer;
    color: #818693;
  }
  .time1 {
    font-size: 14px;
    display: flex;
    -webkit-box-align: center;
    cursor: pointer;
    color: #818693;
  }
  .time::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 14px;
    background-image: url();
    background-repeat: no-repeat;
    background-size: contain;
    margin-right: 8px;
  }
}
.order-info {
  margin-top: 16px;
  padding-left: 10px;
  display: flex;
  box-sizing: border-box;
  justify-content: space-around;
  .el-col {
    display: flex;
    text-align: center;
    flex-direction: column;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    color: #20232a;
    .label {
      font-size: 14px;
      margin-bottom: 21px;
    }
    .num {
      font-size: 36px;
      margin-bottom: 24px;
      font-weight: 700;
    }
    .arrow {
      font-size: 14px;
      color: #818693;
      margin-bottom: 20px;
      display: flex;
      justify-content: center;
      padding-left: 9px;
      -webkit-box-pack: center;
    }
    .arrow::after {
      content: "";
      display: inline-block;
      width: 16px;
      height: 16px;
      background-repeat: no-repeat;
      background-size: contain;
      background-image: url();
    }
  }
}
.tips {
  display: flex;
  align-items: center;
  -webkit-box-pack: center;
  .img {
    width: 20px;
    height: 20px;
    margin-left: 6px;
  }
}
.chart {
  height: 208px;
  margin: 0 auto;
}
.hots {
  height: 293px;
  position: relative;
  .bottom {
    cursor: pointer;
    position: absolute;
    top: 235px;
    display: flex;
    width: 100%;
    justify-content: space-around;
    padding-right: 40px;
    -webkit-box-pack: start;
    .item {
      flex: 25%;
      text-align: center;
      span {
        font-weight: 700;
      }
      span:nth-child(2) {
        color: #e15536;
      }
    }
  }
}
.lines {
  height: 480px;
  .lineChart {
    height: 400px;
  }
}
.task {
  height: 480px;
}
.more {
  font-size: 14px;
  color: #818693;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  cursor: pointer;
}
.more::after {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  background-image: url();
  background-repeat: no-repeat;
  background-size: contain;
  margin-left: 8px;
}
.total {
  font-size: 14px;
  color: #818693;
  margin-top: 0;
}
.totalOrder {
  display: flex;
  justify-content: space-evenly;
  margin-top: 38px;
  .num {
    font-size: 28px;
    color: #e15536;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
  }
  .label {
    font-size: 12px;
    color: #818693;
    text-align: center;
  }
}
.orders {
  height: 595px;
}
.totalScale {
  height: 480px;
}
.col1 {
  width: 58%;
}
.col2 {
  width: 42%;
}
.col3 {
  padding-left: 10px;
  padding-right: 10px;
}
.col4 {
  width: 50%;
}
.function {
  height: 193px;
  .title {
    font-size: 16px;
    font-weight: 700;
    margin-top: 0;
  }
  .el-card__body {
    padding: 20px !important;
  }
}
.list {
  display: flex;
  justify-content: space-around;
  .item:hover {
    p {
      color: #e15536 !important;
    }
  }
  .item {
    width: 15.15%;
    height: 116px;
    background: #fafafb;
    border-radius: 10px;
    cursor: pointer;
    img {
      width: 40px;
      height: 40px;
      margin: 0 auto;
      display: block;
      margin-top: 20px;
    }
    p {
      font-size: 16px;
      color: #20232a;
      font-weight: 700;
      text-align: center;
    }
  }
}
.gzt-remark {
  font-size: 13px;
  color: #818693;
  float: right;
  margin-right: 7px;
}
.el-card__body {
  padding: 23px 20px;
}
</style>
